package com.z996.aop.after;

import com.z996.aop.after.dynamic.ProxyFactoryV2;
import com.z996.aop.before.Calculator;
import com.z996.aop.before.CalculatorLogImpl;
import org.junit.jupiter.api.Test;

/**
 * 简述:<br>
 * 测试类
 *
 * @Author zfh18
 * @Date 2024-03-02 21:37
 * @Version 1.0
 **/
public class TestProxy {
    @Test
    public void testDynamicProxy() {
        ProxyFactoryV2 factory = new ProxyFactoryV2(new CalculatorLogImpl());
        Calculator proxy = (Calculator) factory.getProxy();
        proxy.div(1,1);
        //proxy.div(1,0);
    }
}
